package com.aspose.cells;

public class zbvb extends zcfw {
   private static final com.aspose.cells.b.c.a.za q = new com.aspose.cells.b.c.a.za(new String[]{"br"});

   public zbvb(com.aspose.cells.b.a.d.zm var1) throws Exception {
      super(var1);
   }

   public zbvb(String var1, boolean var2) throws Exception {
      super(var1, var2);
   }

   public void a() throws Exception {
      if (this.l[0].a == 1 && !this.l[0].f) {
         boolean var1 = true;
         char[] var2 = this.l[0].a().toCharArray();

         label96:
         while(true) {
            while(true) {
               label56:
               while(true) {
                  if (!var1) {
                     break label96;
                  }

                  ++this.i;
                  switch(this.h[this.i]) {
                  case '\u0000':
                     this.y();
                     --this.i;
                     break;
                  case '<':
                     ++this.i;
                     if (this.i >= this.j) {
                        this.y();
                     }

                     boolean var3;
                     switch(this.h[this.i]) {
                     case '!':
                        this.f();
                        continue;
                     case '/':
                        var3 = true;
                        int var4 = 0;
                        boolean var5 = true;

                        while(true) {
                           while(var3) {
                              ++this.i;
                              switch(this.h[this.i]) {
                              case '\u0000':
                                 this.y();
                                 --this.i;
                                 break;
                              case '\t':
                              case '\n':
                              case '\r':
                              case ' ':
                                 if (var4 < var2.length) {
                                    var5 = false;
                                 }
                                 break;
                              case '>':
                                 var3 = false;
                                 break;
                              default:
                                 if (var5 && (var4 >= var2.length || var2[var4++] != this.h[this.i])) {
                                    var5 = false;
                                 }
                              }
                           }

                           if (var5) {
                              var1 = false;
                           }
                           continue label56;
                        }
                     case '?':
                        this.e();
                        continue;
                     default:
                        var3 = true;
                     }

                     while(true) {
                        while(true) {
                           if (!var3) {
                              continue label56;
                           }

                           ++this.i;
                           switch(this.h[this.i]) {
                           case '\u0000':
                              this.y();
                              --this.i;
                              break;
                           case '"':
                           case '\'':
                              char var6 = this.h[this.i];

                              while(true) {
                                 ++this.i;
                                 if (this.i >= this.j) {
                                    this.y();
                                 }

                                 if (this.h[this.i] == var6) {
                                    break;
                                 }
                              }
                           case '/':
                           default:
                              break;
                           case '>':
                              var3 = false;
                           }
                        }
                     }
                  }
               }
            }
         }
      }

      this.d();
   }

   public String b() throws Exception {
      switch(this.m.a) {
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
         this.d();
         return "";
      default:
         if (this.l[0].f) {
            this.d();
            return "";
         } else {
            this.m = this.l[0];
            this.m.a = 4;
            this.k = this.i + 1;
            boolean var1 = true;
            char[] var2 = this.l[0].a().toCharArray();
            int var3 = 0;

            while(true) {
               while(true) {
                  label74:
                  while(var1) {
                     ++this.i;
                     switch(this.h[this.i]) {
                     case '\u0000':
                        this.w();
                        --this.i;
                        break;
                     case '<':
                        ++this.i;
                        if (this.i >= this.j) {
                           this.w();
                        }

                        boolean var4;
                        switch(this.h[this.i]) {
                        case '!':
                           if (this.i == 0) {
                              this.d.delete(this.d.length() - 1, this.d.length() - 1 + 1);
                           } else {
                              this.d.append(this.h, this.k, this.i - this.k - 1);
                           }

                           this.f();
                           this.k = this.i + 1;
                           continue;
                        case '/':
                           var3 = 2;
                           var4 = true;
                           int var5 = 0;
                           boolean var6 = true;

                           while(true) {
                              while(var4) {
                                 ++var3;
                                 ++this.i;
                                 switch(this.h[this.i]) {
                                 case '\u0000':
                                    this.w();
                                    --this.i;
                                    break;
                                 case '\t':
                                 case '\n':
                                 case '\r':
                                 case ' ':
                                    if (var5 < var2.length) {
                                       var6 = false;
                                    }
                                    break;
                                 case '>':
                                    var4 = false;
                                    break;
                                 default:
                                    if (var6 && (var5 >= var2.length || var2[var5++] != this.h[this.i])) {
                                       var6 = false;
                                    }
                                 }
                              }

                              if (var6) {
                                 var1 = false;
                              }
                              continue label74;
                           }
                        case '?':
                           if (this.i == 0) {
                              this.d.delete(this.d.length() - 1, this.d.length() - 1 + 1);
                           } else {
                              this.d.append(this.h, this.k, this.i - this.k - 1);
                           }

                           this.e();
                           this.k = this.i + 1;
                           continue;
                        default:
                           var4 = true;
                        }

                        while(true) {
                           while(true) {
                              if (!var4) {
                                 continue label74;
                              }

                              ++this.i;
                              switch(this.h[this.i]) {
                              case '\u0000':
                                 this.w();
                                 --this.i;
                                 break;
                              case '"':
                              case '\'':
                                 char var7 = this.h[this.i];

                                 while(true) {
                                    ++this.i;
                                    if (this.i >= this.j) {
                                       this.w();
                                    }

                                    if (this.h[this.i] == var7) {
                                       break;
                                    }
                                 }
                              case '/':
                              default:
                                 break;
                              case '>':
                                 var4 = false;
                              }
                           }
                        }
                     }
                  }

                  this.d();
                  if (this.d.length() != 0) {
                     this.d.append(this.h, this.k, this.i - this.k);
                     return this.d.substring(0, this.d.length() - var3);
                  }

                  return new String(this.h, this.k, this.i - this.k - var3);
               }
            }
         }
      }
   }

   public zcfq a(zcft var1, boolean var2) throws Exception {
      if (this.b == null) {
         this.b = new boolean[256];
      }

      this.j();
      this.c.c = this.c.d = null;
      boolean var3 = this.p;
      boolean var4 = this.g;
      int var5 = 0;
      Object var6 = this.c;
      Object var7 = null;

      while(true) {
         switch(this.m.a) {
         case 0:
         case 2:
         case 5:
         case 6:
         case 7:
         case 8:
         default:
            break;
         case 1:
            Object var12 = null;
            if (var7 != null) {
               switch(q.a(this.l[0].c)) {
               case 0:
                  var12 = new zcfv((zcfq)var6);
                  ((zcfq)var12).h = "\r\n";
               }
            }

            zcfl var13;
            if (var12 == null) {
               var13 = new zcfl((zcfq)var6);
               var13.a(this.l[0]);
               var12 = var13;
               if (this.o > 0) {
                  var13.a = new zcfh(var13, this.o);

                  for(int var15 = 1; var15 <= this.o; ++var15) {
                     zcfg var11 = new zcfg(var13);
                     var11.a((zaop)this.l[var15]);
                     var13.a.a(var11);
                  }
               }
            }

            if (((zcfq)var6).d != null) {
               zcfq var14 = ((zcfq)var6).d.c;
               ((zcfq)var12).c = var14;
               ((zcfq)var6).d.c = (zcfq)var12;
               ((zcfq)var6).d = (zcfq)var12;
            } else {
               ((zcfq)var12).c = (zcfq)var12;
               ((zcfq)var6).d = (zcfq)var12;
            }

            if (((zcfq)var12).e == 1 && !this.n()) {
               var6 = var12;
               var13 = (zcfl)var12;
               zcfu var16 = var1.a(var13);
               if (var16.b) {
                  var7 = var12;
                  this.p = true;
               }

               this.g = var16.a;
               this.b[var5++] = this.g;
            }
            break;
         case 3:
            zcfv var9 = new zcfv((zcfq)var6);
            var9.h = this.l[0].d;
            if (((zcfq)var6).d != null) {
               zcfq var10 = ((zcfq)var6).d.c;
               var9.c = var10;
               ((zcfq)var6).d.c = var9;
               ((zcfq)var6).d = var9;
            } else {
               var9.c = var9;
               ((zcfq)var6).d = var9;
            }
            break;
         case 4:
            boolean var8 = true;
            if (var7 != null) {
               switch(q.a(this.l[0].c)) {
               case 0:
                  var8 = false;
                  break;
               default:
                  if (com.aspose.cells.b.a.zv.b(this.l[0].c, ((zcfq)var7).g) && com.aspose.cells.b.a.zv.b(this.l[0].b, ((zcfq)var7).f)) {
                     var7 = null;
                     this.p = var3;
                  }
               }
            }

            if (var8) {
               var6 = ((zcfq)var6).b;
               --var5;
               this.g = this.b[var5];
            }
         }

         if (var5 == 0) {
            this.g = var4;
            this.p = var3;
            this.d();
            if (var2) {
               return this.c;
            }

            return this.c.d;
         }

         this.d();
      }
   }
}
